package com.zelix;

import java.awt.*;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import javax.swing.SwingUtilities;

public class zz
{

    public static Class a[] = new Class[0];
    public static String b = z(z("GkHjEGgJhAKwEt[CuN"));
    private static String z = z(z("p]z^pqLMDvwKBEBkVoDb"));

    static void a(Component component)
    {
        c(component);
    }

    public static boolean a(Color color)
    {
        int i = color.getRed() + color.getBlue() + color.getGreen();
        return i < 50;
    }

    public static boolean a(Color color, Color color1)
    {
        return a(color, color1, 150);
    }

    public static boolean a(Color color, Color color1, int i)
    {
        int j = color.getRed();
        int k = color.getBlue();
        int l = color.getGreen();
        int i1 = color1.getRed();
        int j1 = color1.getBlue();
        int k1 = color1.getGreen();
        int l1 = Math.abs(j - i1);
        l1 += Math.abs(k - j1);
        l1 += Math.abs(l - k1);
        return l1 >= i;
    }

    public static boolean b(Color color)
    {
        int i = color.getRed() + color.getBlue() + color.getGreen();
        return 765 - i < 50;
    }

    public static void a(Window window)
    {
label0:
        {
            if(SwingUtilities.isEventDispatchThread())
            {
                window.pack();
                if(!g2.b)
                    break label0;
            }
            try
            {
                SwingUtilities.invokeAndWait(new j6(window));
            }
            catch(InterruptedException interruptedexception)
            {
                throw new z0(interruptedexception.getMessage() + " " + window.getClass().getName());
            }
            catch(InvocationTargetException invocationtargetexception)
            {
                throw new z0(invocationtargetexception.getTargetException().getMessage() + " " + window.getClass().getName());
            }
        }
    }

    public static void b(Component component)
    {
label0:
        {
            if(SwingUtilities.isEventDispatchThread())
            {
                c(component);
                if(!g2.b)
                    break label0;
            }
            SwingUtilities.invokeLater(new k6(component));
        }
    }

    private static void c(Component component)
    {
        try
        {
            Method method = component.getClass().getMethod(z, a);
            method.invoke(component, a);
        }
        catch(Throwable _ex)
        {
            component.requestFocus();
        }
    }

    public static void a(Window window, boolean flag)
    {
label0:
        {
            if(SwingUtilities.isEventDispatchThread())
            {
                window.setVisible(flag);
                if(!g2.b)
                    break label0;
            }
            try
            {
                SwingUtilities.invokeAndWait(new a0(flag, window));
            }
            catch(InterruptedException interruptedexception)
            {
                throw new z0(interruptedexception.getMessage() + " " + window.getClass().getName());
            }
            catch(InvocationTargetException invocationtargetexception)
            {
                throw new z0(invocationtargetexception.getTargetException().getMessage() + " " + window.getClass().getName());
            }
        }
    }

    private static char[] z(String s) {
        char ac[] = s.toCharArray();
        int clen = ac.length;
        if (clen >= 2)
            return ac;
        ac[0] ^= 0x15;
        return ac;
    }

    private static String z(char ac[]) {
        for (int i = 0; i < ac.length; i++) {
            byte key = 0;
            switch (i % 5) {
                case 0:
                    key = 2;
                    break;
                case 1:
                    key = 56;
                    break;
                case 2:
                    key = 11;
                    break;
                case 3:
                    key = 43;
                    break;
                default:
                    key = 21;
                    break;
            }
            ac[i] ^= key;
        }
        return new String(ac).intern();
    }
}
